package com.androidme.app.framework.widget;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.EditText;
import com.androidme.R;

public class LoginDialog extends Dialog implements View.OnClickListener {

    private Button loginBtn;
    private Button registerBtn;
    protected EditText usernameET;
    protected EditText passwordET;
    protected CheckBox autoLoginCB;


    public LoginDialog(Context context, int theme) {
        super(context, theme);
    }

    public LoginDialog(Context context) {
        super(context);
    }


    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_login:
                break;
            case R.id.btn_register:
                break;
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);

        this.setContentView(LayoutInflater.from(getContext()).inflate(R.layout.dialog_login, null));

        loginBtn = (Button) findViewById(R.id.btn_login);
        registerBtn = (Button) findViewById(R.id.btn_register);
        usernameET = (EditText) findViewById(R.id.edit_login_username);
        passwordET = (EditText) findViewById(R.id.edit_login_password);
        autoLoginCB = (CheckBox) findViewById(R.id.check_auto_login);
        loginBtn.setOnClickListener(this);
        registerBtn.setOnClickListener(this);
    }
}
